package com.zx.map.service;

import com.zx.map.service.model.AgentInfoModel;
import com.zx.map.service.model.MerchantInfoModel;
import com.zx.map.service.model.ShareProfitDetailLogModel;
import com.zx.mobile.domain.ShareProfitDetailDomain;
import com.zx.mobile.domain.SpDetailDomain;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA. User: Administrator Date: 14-3-1 Time: 上午11:06 To
 * change this template use File | Settings | File Templates.
 */
public interface ShareProfitDetailLogService {

	/**
	 * 根据Model查找列表
	 *
	 * @param spDetailDomain
	 * @return
	 * @throws DataAccessException
	 */
	public List<ShareProfitDetailLogModel> getListByModel(SpDetailDomain spDetailDomain)
			throws DataAccessException;

	/**
	 * 新增并返回主键
	 *
	 * @param model
	 * @return
	 * @throws DataAccessException
	 */
	public String add(ShareProfitDetailLogModel model) throws DataAccessException;

	/**
	 * 更新并返回主键
	 *
	 * @param model
	 * @throws DataAccessException
	 */
	public String update(ShareProfitDetailLogModel model) throws DataAccessException;

	/**
	 * 删除
	 *
	 * @return
	 * @throws DataAccessException
	 */
	public void delete(ShareProfitDetailLogModel model) throws DataAccessException;

	/**
   * 分页查询
   *
   * @param domain
   * @return
   * @throws DataAccessException
   */
    public Map getPageByDomain(AgentInfoModel curAgentInfoModel, AgentInfoModel searchAgentInfoModel, MerchantInfoModel searchMerchantInfoModel, ShareProfitDetailDomain domain)
          throws DataAccessException;

	/**
	 * 我的收益分页查询
	 * @param domain
	 * @throws DataAccessException
	 */
	public Map getMyShareProfitPageByDomain(AgentInfoModel curAgentInfoModel, AgentInfoModel searchAgentInfoModel, MerchantInfoModel searchMerchantInfoModel, ShareProfitDetailDomain domain)
		  throws DataAccessException;

	/**
	 * 查询总收益
	 * @return
	 */
	public Double queryTotalSpDetailAmtByExample(AgentInfoModel currentLoginAgentInfo,AgentInfoModel searchAgentInfoModel,MerchantInfoModel searchMerchantInfoModel,ShareProfitDetailDomain domain);

}
